<div class="eventcategory_dropdown">
<?php
$categoryTree = cri("Events.EventCategory")->getOptions();
echo $form->input('event_category_id',array('label'=>'','type'=>'select','options'=>$categoryTree,'empty'=>__('-Select-'),'onchange'=>'return showEventCategory(this);'));
?>
</div>
<script type="text/javascript">

function showEventCategory(caller)
{	/*
		newCatId = document.getElementById('event_category_id').value;
		var url = "<?php //echo $html->url(array('action'=>'index','controller'=>'events','plugin'=>'events'))?>";
		url += '/categoryId:'+newCatId;
		window.location = url;
		return true;
	*/
	category_id = $(caller).val();
	if(category_id)
	{
		var url = "<?php echo $html->url(array('controller'=>'events','plugin'=>'events','action'=>'index'))?>";	
		url += '/categoryId:'+category_id;
		window.location = url;
	}
	return true;
}
</script>
